/*
 * Flowable CMMN REST API
 * # flowable / flowəb(ə)l /    - a compact and highly efficient workflow and Business Process Management (BPM) platform for developers, system admins and business users.  - a lightning fast, tried and tested BPMN 2 process engine written in Java. It is Apache 2.0 licensed open source, with a committed community.  - can run embedded in a Java application, or as a service on a server, a cluster, and in the cloud. It integrates perfectly with Spring. With a rich Java and REST API, it is the ideal engine for orchestrating human or system activities.
 *
 * OpenAPI spec version: v1
 *
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */


package com.ibm.risk.irmp.workflow.client.flowable.model;

import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;

/**
 * Only one of caseDefinitionId or caseDefinitionKey can be used in the request body
 */
@ApiModel(description = "Only one of caseDefinitionId or caseDefinitionKey can be used in the request body")

public class CaseInstanceCreateRequest {
  @JsonProperty("caseDefinitionId")
  private String caseDefinitionId = null;

  @JsonProperty("caseDefinitionKey")
  private String caseDefinitionKey = null;

  @JsonProperty("businessKey")
  private String businessKey = null;

  @JsonProperty("variables")
  private List<RestVariable> variables = null;

  @JsonProperty("transientVariables")
  private List<RestVariable> transientVariables = null;

  @JsonProperty("startFormVariables")
  private List<RestVariable> startFormVariables = null;

  @JsonProperty("outcome")
  private String outcome = null;

  @JsonProperty("tenantId")
  private String tenantId = null;

  @JsonProperty("returnVariables")
  private Boolean returnVariables = null;

  public CaseInstanceCreateRequest caseDefinitionId(String caseDefinitionId) {
    this.caseDefinitionId = caseDefinitionId;
    return this;
  }

   /**
   * Get caseDefinitionId
   * @return caseDefinitionId
  **/
  @ApiModelProperty(example = "oneTaskCase:1:158", value = "")
  public String getCaseDefinitionId() {
    return caseDefinitionId;
  }

  public void setCaseDefinitionId(String caseDefinitionId) {
    this.caseDefinitionId = caseDefinitionId;
  }

  public CaseInstanceCreateRequest caseDefinitionKey(String caseDefinitionKey) {
    this.caseDefinitionKey = caseDefinitionKey;
    return this;
  }

   /**
   * Get caseDefinitionKey
   * @return caseDefinitionKey
  **/
  @ApiModelProperty(example = "oneTaskCase", value = "")
  public String getCaseDefinitionKey() {
    return caseDefinitionKey;
  }

  public void setCaseDefinitionKey(String caseDefinitionKey) {
    this.caseDefinitionKey = caseDefinitionKey;
  }

  public CaseInstanceCreateRequest businessKey(String businessKey) {
    this.businessKey = businessKey;
    return this;
  }

   /**
   * Get businessKey
   * @return businessKey
  **/
  @ApiModelProperty(example = "myBusinessKey", value = "")
  public String getBusinessKey() {
    return businessKey;
  }

  public void setBusinessKey(String businessKey) {
    this.businessKey = businessKey;
  }

  public CaseInstanceCreateRequest variables(List<RestVariable> variables) {
    this.variables = variables;
    return this;
  }

  public CaseInstanceCreateRequest addVariablesItem(RestVariable variablesItem) {
    if (this.variables == null) {
      this.variables = new ArrayList<RestVariable>();
    }
    this.variables.add(variablesItem);
    return this;
  }

   /**
   * Get variables
   * @return variables
  **/
  @ApiModelProperty(value = "")
  public List<RestVariable> getVariables() {
    return variables;
  }

  public void setVariables(List<RestVariable> variables) {
    this.variables = variables;
  }

  public CaseInstanceCreateRequest transientVariables(List<RestVariable> transientVariables) {
    this.transientVariables = transientVariables;
    return this;
  }

  public CaseInstanceCreateRequest addTransientVariablesItem(RestVariable transientVariablesItem) {
    if (this.transientVariables == null) {
      this.transientVariables = new ArrayList<RestVariable>();
    }
    this.transientVariables.add(transientVariablesItem);
    return this;
  }

   /**
   * Get transientVariables
   * @return transientVariables
  **/
  @ApiModelProperty(value = "")
  public List<RestVariable> getTransientVariables() {
    return transientVariables;
  }

  public void setTransientVariables(List<RestVariable> transientVariables) {
    this.transientVariables = transientVariables;
  }

  public CaseInstanceCreateRequest startFormVariables(List<RestVariable> startFormVariables) {
    this.startFormVariables = startFormVariables;
    return this;
  }

  public CaseInstanceCreateRequest addStartFormVariablesItem(RestVariable startFormVariablesItem) {
    if (this.startFormVariables == null) {
      this.startFormVariables = new ArrayList<RestVariable>();
    }
    this.startFormVariables.add(startFormVariablesItem);
    return this;
  }

   /**
   * Get startFormVariables
   * @return startFormVariables
  **/
  @ApiModelProperty(value = "")
  public List<RestVariable> getStartFormVariables() {
    return startFormVariables;
  }

  public void setStartFormVariables(List<RestVariable> startFormVariables) {
    this.startFormVariables = startFormVariables;
  }

  public CaseInstanceCreateRequest outcome(String outcome) {
    this.outcome = outcome;
    return this;
  }

   /**
   * Get outcome
   * @return outcome
  **/
  @ApiModelProperty(value = "")
  public String getOutcome() {
    return outcome;
  }

  public void setOutcome(String outcome) {
    this.outcome = outcome;
  }

  public CaseInstanceCreateRequest tenantId(String tenantId) {
    this.tenantId = tenantId;
    return this;
  }

   /**
   * Get tenantId
   * @return tenantId
  **/
  @ApiModelProperty(example = "tenant1", value = "")
  public String getTenantId() {
    return tenantId;
  }

  public void setTenantId(String tenantId) {
    this.tenantId = tenantId;
  }

  public CaseInstanceCreateRequest returnVariables(Boolean returnVariables) {
    this.returnVariables = returnVariables;
    return this;
  }

   /**
   * Get returnVariables
   * @return returnVariables
  **/
  @ApiModelProperty(value = "")
  public Boolean getReturnVariables() {
    return returnVariables;
  }

  public void setReturnVariables(Boolean returnVariables) {
    this.returnVariables = returnVariables;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    CaseInstanceCreateRequest caseInstanceCreateRequest = (CaseInstanceCreateRequest) o;
    return Objects.equals(this.caseDefinitionId, caseInstanceCreateRequest.caseDefinitionId) &&
        Objects.equals(this.caseDefinitionKey, caseInstanceCreateRequest.caseDefinitionKey) &&
        Objects.equals(this.businessKey, caseInstanceCreateRequest.businessKey) &&
        Objects.equals(this.variables, caseInstanceCreateRequest.variables) &&
        Objects.equals(this.transientVariables, caseInstanceCreateRequest.transientVariables) &&
        Objects.equals(this.startFormVariables, caseInstanceCreateRequest.startFormVariables) &&
        Objects.equals(this.outcome, caseInstanceCreateRequest.outcome) &&
        Objects.equals(this.tenantId, caseInstanceCreateRequest.tenantId) &&
        Objects.equals(this.returnVariables, caseInstanceCreateRequest.returnVariables);
  }

  @Override
  public int hashCode() {
    return Objects.hash(caseDefinitionId, caseDefinitionKey, businessKey, variables, transientVariables, startFormVariables, outcome, tenantId, returnVariables);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class CaseInstanceCreateRequest {\n");

    sb.append("    caseDefinitionId: ").append(toIndentedString(caseDefinitionId)).append("\n");
    sb.append("    caseDefinitionKey: ").append(toIndentedString(caseDefinitionKey)).append("\n");
    sb.append("    businessKey: ").append(toIndentedString(businessKey)).append("\n");
    sb.append("    variables: ").append(toIndentedString(variables)).append("\n");
    sb.append("    transientVariables: ").append(toIndentedString(transientVariables)).append("\n");
    sb.append("    startFormVariables: ").append(toIndentedString(startFormVariables)).append("\n");
    sb.append("    outcome: ").append(toIndentedString(outcome)).append("\n");
    sb.append("    tenantId: ").append(toIndentedString(tenantId)).append("\n");
    sb.append("    returnVariables: ").append(toIndentedString(returnVariables)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}
